};
GtkIconCache *
-_gtk_icon_cache_ref (GtkIconCache *cache)
+gtk_icon_cache_ref (GtkIconCache *cache)
{
cache->ref_count++;
return cache;
}
void
-_gtk_icon_cache_unref (GtkIconCache *cache)
+gtk_icon_cache_unref (GtkIconCache *cache)
{
cache->ref_count --;
}
GtkIconCache *
-_gtk_icon_cache_new_for_path (const gchar *path)
+gtk_icon_cache_new_for_path (const gchar *path)
{
GtkIconCache *cache = NULL;
GMappedFile *map;
info.n_directories = 0;
info.flags = CHECK_OFFSETS|CHECK_STRINGS;
- if (!_gtk_icon_cache_validate (&info))
+ if (!gtk_icon_cache_validate (&info))
{
g_mapped_file_unref (map);
g_warning ("Icon cache '%s' is invalid", cache_filename);
}
GtkIconCache *
-_gtk_icon_cache_new (const gchar *data)
+gtk_icon_cache_new (const gchar *data)
{
GtkIconCache *cache;
}
gint
-_gtk_icon_cache_get_directory_index (GtkIconCache *cache,
+gtk_icon_cache_get_directory_index (GtkIconCache *cache,
const gchar *directory)
{
return get_directory_index (cache, directory);
}
gint
-_gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
+gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
const gchar *icon_name,
gint directory_index)
{
}
gboolean
-_gtk_icon_cache_has_icons (GtkIconCache *cache,
+gtk_icon_cache_has_icons (GtkIconCache *cache,
const gchar *directory)
{
int directory_index;
}
void
-_gtk_icon_cache_add_icons (GtkIconCache *cache,
+gtk_icon_cache_add_icons (GtkIconCache *cache,
const gchar *directory,
GHashTable *hash_table)
{
}
gboolean
-_gtk_icon_cache_has_icon (GtkIconCache *cache,
+gtk_icon_cache_has_icon (GtkIconCache *cache,
const gchar *icon_name)
{
guint32 hash_offset;
}
gboolean
-_gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
+gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
const gchar *icon_name,
const gchar *directory)
{
{
GtkIconCache *cache = data;
- _gtk_icon_cache_unref (cache);
+ gtk_icon_cache_unref (cache);
}
GdkPixbuf *
-_gtk_icon_cache_get_icon (GtkIconCache *cache,
+gtk_icon_cache_get_icon (GtkIconCache *cache,
const gchar *icon_name,
gint directory_index)
{
return NULL;
}
- _gtk_icon_cache_ref (cache);
+ gtk_icon_cache_ref (cache);
return pixbuf;
}
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GTK_ICON_CACHE_H__
-#define __GTK_ICON_CACHE_H__
+#ifndef __GTK_ICON_CACHE_PRIVATE_H__
+#define __GTK_ICON_CACHE_PRIVATE_H__
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
typedef struct _GtkIconCache GtkIconCache;
-GtkIconCache *_gtk_icon_cache_new (const gchar *data);
-GtkIconCache *_gtk_icon_cache_new_for_path (const gchar *path);
-gint _gtk_icon_cache_get_directory_index (GtkIconCache *cache,
- const gchar *directory);
-gboolean _gtk_icon_cache_has_icon (GtkIconCache *cache,
- const gchar *icon_name);
-gboolean _gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
- const gchar *icon_name,
- const gchar *directory);
-gboolean _gtk_icon_cache_has_icons (GtkIconCache *cache,
- const gchar *directory);
-void _gtk_icon_cache_add_icons (GtkIconCache *cache,
- const gchar *directory,
- GHashTable *hash_table);
-
-gint _gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
- const gchar *icon_name,
- gint directory_index);
-GdkPixbuf *_gtk_icon_cache_get_icon (GtkIconCache *cache,
- const gchar *icon_name,
- gint directory_index);
-
-GtkIconCache *_gtk_icon_cache_ref (GtkIconCache *cache);
-void _gtk_icon_cache_unref (GtkIconCache *cache);
-
-
-#endif /* __GTK_ICON_CACHE_H__ */
+GtkIconCache *gtk_icon_cache_new (const gchar *data);
+GtkIconCache *gtk_icon_cache_new_for_path (const gchar *path);
+gint gtk_icon_cache_get_directory_index (GtkIconCache *cache,
+ const gchar *directory);
+gboolean gtk_icon_cache_has_icon (GtkIconCache *cache,
+ const gchar *icon_name);
+gboolean gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
+ const gchar *icon_name,
+ const gchar *directory);
+gboolean gtk_icon_cache_has_icons (GtkIconCache *cache,
+ const gchar *directory);
+void gtk_icon_cache_add_icons (GtkIconCache *cache,
+ const gchar *directory,
+ GHashTable *hash_table);
+
+gint gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
+ const gchar *icon_name,
+ gint directory_index);
+GdkPixbuf *gtk_icon_cache_get_icon (GtkIconCache *cache,
+ const gchar *icon_name,
+ gint directory_index);
+
+GtkIconCache *gtk_icon_cache_ref (GtkIconCache *cache);
+void gtk_icon_cache_unref (GtkIconCache *cache);
+
+G_END_DECLS
+
+#endif /* __GTK_ICON_CACHE_PRIVATE_H__ */
free_dir_mtime (IconThemeDirMtime *dir_mtime)
{
if (dir_mtime->cache)
- _gtk_icon_cache_unref (dir_mtime->cache);
+ gtk_icon_cache_unref (dir_mtime->cache);
g_free (dir_mtime->dir);
g_slice_free (IconThemeDirMtime, dir_mtime);
dir_mtime->mtime = stat_buf.st_mtime;
dir_mtime->exists = TRUE;
- dir_mtime->cache = _gtk_icon_cache_new_for_path (dir);
+ dir_mtime->cache = gtk_icon_cache_new_for_path (dir);
if (dir_mtime->cache != NULL)
continue;
IconThemeDirMtime *dir_mtime = l->data;
GtkIconCache *cache = dir_mtime->cache;
- if (cache && _gtk_icon_cache_has_icon (cache, icon_name))
+ if (cache && gtk_icon_cache_has_icon (cache, icon_name))
return TRUE;
}
theme_dir_destroy (IconThemeDir *dir)
{
if (dir->cache)
- _gtk_icon_cache_unref (dir->cache);
+ gtk_icon_cache_unref (dir->cache);
if (dir->icons)
g_hash_table_destroy (dir->icons);
if (dir->cache)
{
- suffix = (IconSuffix)_gtk_icon_cache_get_icon_flags (dir->cache,
+ suffix = (IconSuffix)gtk_icon_cache_get_icon_flags (dir->cache,
icon_name,
dir->subdir_index);
{
/* Look for foo-symbolic.symbolic.png, as the cache only stores the ".png" suffix */
char *icon_name_with_prefix = g_strconcat (icon_name, ".symbolic", NULL);
- symbolic_suffix = (IconSuffix)_gtk_icon_cache_get_icon_flags (dir->cache,
+ symbolic_suffix = (IconSuffix)gtk_icon_cache_get_icon_flags (dir->cache,
icon_name_with_prefix,
dir->subdir_index);
g_free (icon_name_with_prefix);
if (min_dir->cache)
{
- icon_info->cache_pixbuf = _gtk_icon_cache_get_icon (min_dir->cache, icon_name,
+ icon_info->cache_pixbuf = gtk_icon_cache_get_icon (min_dir->cache, icon_name,
min_dir->subdir_index);
}
context == 0)
{
if (dir->cache)
- _gtk_icon_cache_add_icons (dir->cache, dir->subdir, icons);
+ gtk_icon_cache_add_icons (dir->cache, dir->subdir, icons);
else
g_hash_table_foreach (dir->icons, add_key_to_hash, icons);
}
if (dir->cache)
{
- if (_gtk_icon_cache_has_icon (dir->cache, icon_name))
+ if (gtk_icon_cache_has_icon (dir->cache, icon_name))
return TRUE;
}
else
if (dir_mtime->cache == NULL)
{
/* This will return NULL if the cache doesn't exist or is outdated */
- dir_mtime->cache = _gtk_icon_cache_new_for_path (dir_mtime->dir);
+ dir_mtime->cache = gtk_icon_cache_new_for_path (dir_mtime->dir);
}
dir = g_new0 (IconThemeDir, 1);
if (dir_mtime->cache != NULL)
{
- dir->cache = _gtk_icon_cache_ref (dir_mtime->cache);
- dir->subdir_index = _gtk_icon_cache_get_directory_index (dir->cache, dir->subdir);
- has_icons = _gtk_icon_cache_has_icons (dir->cache, dir->subdir);
+ dir->cache = gtk_icon_cache_ref (dir_mtime->cache);
+ dir->subdir_index = gtk_icon_cache_get_directory_index (dir->cache, dir->subdir);
+ has_icons = gtk_icon_cache_has_icons (dir->cache, dir->subdir);
}
else
{